package com.pig.graduate.domain.produce;


import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pig.graduate.domain.BaseEntity;
import com.pig.graduate.domain.CustomDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * (ProduceBoar)表实体类
 *
 * @author makejava
 * @since 2023-02-28 14:14:40
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProduceBoar extends BaseEntity implements Serializable {

    //进场日期
    @JsonSerialize(using= CustomDateTimeSerializer.class)
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd HH:mm:ss")
    private Date entryDate;
    //耳号
    private String earCode;
    //猪只类型
    private String pigType;
    //入场胎次
    private Integer entryBirths;
    //进场类型
    private String entryType;
    //所在猪舍名
    @TableField(exist = false)
    private String buildsName;
    //所在猪舍
    private Long buildingsId;
    //所在栏号
    private Long columnId;
    @TableField(exist = false)
    private Long columnName;
    //所在位置
    @TableField(exist = false)
    private String location;
    //出生日期
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd HH:mm:ss")
    private Date dateOfBirth;
    //日龄
    @TableField(exist = false)
    private Long birthDay;
    //品种
    private String variety;
    //状态
    private String state;
    //状态日期
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd HH:mm:ss")
    private Date stateDate;
    //状态天数
    @TableField(exist = false)
    private Long stateDay;
    //价格
    private BigDecimal price;
    //创建人
    private Long operatorsUser;
    //创建人姓名
    @TableField(exist = false)
    private String operatorsUserName;
    //是否在场
    private String isPresent;

}

